class Task15:
    def run(self, num):
        count = 0
        while num != 0:
            num_minus_1 = num - 1
            num = num & num_minus_1
            count += 1
        return count
